package cn.accp.carFactory.base;

/**
 * 汽车抽象类
 * 
 * @author Jiangqs
 * 
 */
public abstract class Car {
	// 轮胎
	public Tyre tyre;
	// 轮胎数
	final public int tyreCount = 4;
	// 引擎
	Engine engine;
	// 引擎数
	final public int engineCount = 1;
	Carframe carframe;
	// 车架数
	final public int carframeCount = 1;

	public Car(Tyre tyre, Engine engine, Carframe carframe) {
		super();
		this.tyre = tyre;
		this.engine = engine;
		this.carframe = carframe;
	}

	// 汽车开始生产
	public abstract void start();

	// 汽车完工
	public abstract void complete();

	@Override
	public String toString() {
		return this.engine.toString() + "" + this.engineCount + ";"
				+ this.tyre.toString() + "" + this.tyreCount + ";"
				+ this.carframe.toString() + "" + this.carframeCount + ".";
	}
}
